import lucene.server.client.ClientWrapper;
import lucene.server.client.QueryClient;

/**
 * 主程序类，用于演示如何使用QueryClient进行分组查询。
 */
public class MainGroup {
    // 初始化QueryClient实例，用于与服务器进行通信
    static QueryClient queryClient = new QueryClient("http://localhost:9999","client","client");

    public static void main(String[] args) {
            ClientWrapper clientWrapper = ClientWrapper.create()
                    .GROUP("main_kind")
                    .From("supervision");
            System.out.println(clientWrapper.build());
            long startTime = System.currentTimeMillis();
            String str = queryClient.request(clientWrapper);
            long endTime = System.currentTimeMillis();
            System.out.printf("Elapsed time: %d \n", (endTime - startTime));

            System.out.println(str);
        }

}